local zhongyi_active = fk.CreateSkill{
    name = "XD__zhongyi_active"
}

zhongyi_active:addEffect("active", {
    interaction = function (self, player)
        local choices = {"XD__zhongyi_discard"}
        table.insertTableIfNeed(choices, player:getAvailableEquipSlots())
        if #choices > 0 then
            --table.insert(choices, "Cancel")
            return UI.ComboBox{ choices = choices }
        end
    end,
    card_filter = function (self, player, to_select, selected, selected_targets)
        if self.interaction.data and self.interaction.data == "XD__zhongyi_discard" then
            return #selected == 0 and Fk:getCardById(to_select).type == Card.TypeEquip
        end
        return false
    end,
    target_filter = Util.FalseFunc,
    feasible = function (self, player, selected, selected_cards, card)
        if self.interaction.data then
            if self.interaction.data == "XD__zhongyi_discard" then
                return #selected_cards == 1
            else
                return true
            end
        end
    end,
})

return zhongyi_active